#usr/bin/env python3
#-*- coding:utf-8 -*-
import datetime
class Person(object):
    _num=0
    def __init__(self,name,sex,birthday,ident):
        if not (isinstance(name,str)) and  sex in ("男","女"):
            raise PersonValueError(name,sex)
        try:
            birth=datetime.date(*birthday)
        except:
            raise PersonValueError("Wrong date:",birthday)
        self._name=name
        self._sex=sex
        self._birthday=birth
        self._id=ident
        Person._num+=1
        pass
    pass

    def name(self):
        return self._name
    pass

    def id(self):
        return self._id
    pass

    def sex(self):
        return self._sex
    pass

    def birthdy(self):
        return self.birthdy
    pass

    def age(self):
        return (datetime.date.today().year-self._birthday.year)
    pass




class Student(Person):
    def __init__(self,college,registrationTime,course,score):
        self.college=college
        self.registrationTime=registrationTime
        self.course=course
        self.score=score
        pass

class Teacher(Person):
    def __init__(self,hireDate,college,position,salary):
        self.hireDate=hireDate
        self.college=college
        self.position=position
        self.salary=salary
        pass

